webpackJsonp([2],{

/***/ 198:
/***/ (function(module, exports, __webpack_require__) {

var disposed = false
function injectStyle (ssrContext) {
  if (disposed) return
  __webpack_require__(212)
}
var normalizeComponent = __webpack_require__(76)
/* script */
var __vue_script__ = __webpack_require__(217)
/* template */
var __vue_template__ = __webpack_require__(222)
/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = "data-v-69787b62"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  __vue_script__,
  __vue_template__,
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)
Component.options.__file = "resources/assets/js/components/login.vue"

/* hot reload */
if (false) {(function () {
  var hotAPI = require("vue-hot-reload-api")
  hotAPI.install(require("vue"), false)
  if (!hotAPI.compatible) return
  module.hot.accept()
  if (!module.hot.data) {
    hotAPI.createRecord("data-v-69787b62", Component.options)
  } else {
    hotAPI.reload("data-v-69787b62", Component.options)
  }
  module.hot.dispose(function (data) {
    disposed = true
  })
})()}

module.exports = Component.exports


/***/ }),

/***/ 212:
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(213);
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var update = __webpack_require__(77)("13e40ef2", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-69787b62\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../node_modules/vux-loader/src/style-loader.js!../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./login.vue", function() {
     var newContent = require("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-69787b62\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../node_modules/vux-loader/src/style-loader.js!../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./login.vue");
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),

/***/ 213:
/***/ (function(module, exports, __webpack_require__) {

var escape = __webpack_require__(78);
exports = module.exports = __webpack_require__(48)(false);
// imports


// module
exports.push([module.i, "\n.login[data-v-69787b62] {\n    background: url(" + escape(__webpack_require__(214)) + ") no-repeat;\n    background-size: 100% 100%;\n    position: fixed;\n    width: 100%;\n    height: 100%;\n    min-width: 1400px;\n}\n.login-form[data-v-69787b62] {\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    margin: auto;\n    width: 900px;\n    height: 350px;\n    border: 6px solid rgba(69, 166, 219, .7);\n    -ms-border: 6px solid #3ea1db;\n    border-radius: 7px;\n}\n.login-form > div[data-v-69787b62] {\n    float: left;\n    height: 100%;\n}\n.login-form-img[data-v-69787b62] {\n    width: 415px;\n    background: #fff url(" + escape(__webpack_require__(215)) + ") center no-repeat;\n}\n.login-form-img p[data-v-69787b62] {\n    margin: 0;\n    width: 22px;\n    height: 100%;\n    float: right;\n    background: url(" + escape(__webpack_require__(216)) + ");\n}\n.login-form-content[data-v-69787b62] {\n    width: 485px;\n    background-color: #fff;\n    padding: 17px 55px;\n    -webkit-box-sizing: border-box;\n            box-sizing: border-box;\n}\n.login-form-content > h2[data-v-69787b62] {\n    height: 50px;\n    line-height: 50px;\n    font-size: 24px;\n    color: #0067b2;\n    border-bottom: 1px solid #c6e1f4;\n    margin-bottom: 24px;\n}\n.login-form-yzm[data-v-69787b62] {\n    width: 232px;\n}\n.yzm_code[data-v-69787b62] {\n    float: right;\n    width: 131px;\n    height: 36px;\n    border: 1px solid #bfcbd9;\n    border-radius: 4px;\n    -webkit-box-sizing: border-box;\n            box-sizing: border-box;\n}\n.login-btn[data-v-69787b62] {\n    width: 100%;\n}\n", ""]);

// exports


/***/ }),

/***/ 214:
/***/ (function(module, exports) {

module.exports = "/images/login_bj.jpg?8f0ad593f9a73cc1a2653e01fd25716a";

/***/ }),

/***/ 215:
/***/ (function(module, exports) {

module.exports = "/images/lg-fr-img.png?b871da6af121de3c7acedcd8d3f1f064";

/***/ }),

/***/ 216:
/***/ (function(module, exports) {

module.exports = "/images/s-t.jpg?379e9d4b6f21d104bbd39eb4ab65b039";

/***/ }),

/***/ 217:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_element_ui_packages_form_src_form__ = __webpack_require__(218);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_element_ui_packages_form_src_form___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_element_ui_packages_form_src_form__);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//



/* harmony default export */ __webpack_exports__["default"] = ({
    data: function data() {
        return {
            yzm_code: this.getApi('coms/admin-code'),
            ruleForm: {
                act: '',
                pass: '',
                code: ''
            },
            rules: {
                act: [{ validator: this.va.vaAct, trigger: 'blur' }],
                pass: [{ min: 10, max: 18, message: '长度 10 到 18 个字符', trigger: 'blur' }, { validator: this.va.vaPass, trigger: 'blur' }],
                code: [{ required: true, message: '请输入验证码', trigger: 'blur' }, { min: 5, max: 5, message: '长度 5 个字符', trigger: 'blur' }]
            },
            loading: false
        };
    },
    created: function created() {},

    methods: {
        submitForm: function submitForm(formName) {
            var _this = this;

            this.$refs[formName].validate(function (valid) {
                if (valid) {
                    _this.loading = true;
                    window.axiox.post(_this.getApi('root/login-act'), _this.dafa({
                        username: _this.ruleForm.act,
                        userpass: _this.ruleForm.pass,
                        yzm: _this.ruleForm.code
                    })).then(function (res) {
                        _this.loading = false;
                        if (res.data.code === 0) {
                            sessionStorage.setItem('user', JSON.stringify({ id: res.data.id, name: res.data.name }));
                            _this.$message(res.data.msg);
                            //成功后跳转到Vue的界面 首页
                            _this.$router.push('/home');
                        } else {
                            _this.$message(res.data.msg);
                            _this.change_yzm();
                        }
                    }).catch(function (err) {
                        _this.loading = false;
                        _this.$message('请重试');
                    });
                } else {
                    _this.$message('请检查填写信息是否有误');
                    return false;
                }
            });
        },
        change_yzm: function change_yzm() {
            this.yzm_code = this.getApi('coms/admin-code') + '?code=' + Math.random();
            this.ruleForm.code = null;
        }
    },
    components: { ElForm: __WEBPACK_IMPORTED_MODULE_0_element_ui_packages_form_src_form___default.a }
});

/***/ }),

/***/ 218:
/***/ (function(module, exports, __webpack_require__) {

var disposed = false
var normalizeComponent = __webpack_require__(76)
/* script */
var __vue_script__ = __webpack_require__(219)
/* template */
var __vue_template__ = __webpack_require__(221)
/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = null
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  __vue_script__,
  __vue_template__,
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)
Component.options.__file = "node_modules/element-ui/packages/form/src/form.vue"

/* hot reload */
if (false) {(function () {
  var hotAPI = require("vue-hot-reload-api")
  hotAPI.install(require("vue"), false)
  if (!hotAPI.compatible) return
  module.hot.accept()
  if (!module.hot.data) {
    hotAPI.createRecord("data-v-54be03ab", Component.options)
  } else {
    hotAPI.reload("data-v-54be03ab", Component.options)
  }
  module.hot.dispose(function (data) {
    disposed = true
  })
})()}

module.exports = Component.exports


/***/ }),

/***/ 219:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_element_ui_src_utils_merge__ = __webpack_require__(220);
//
//
//
//
//
//
//
//



/* harmony default export */ __webpack_exports__["default"] = ({
  name: 'ElForm',

  componentName: 'ElForm',

  provide: function provide() {
    return {
      elForm: this
    };
  },


  props: {
    model: Object,
    rules: Object,
    labelPosition: String,
    labelWidth: String,
    labelSuffix: {
      type: String,
      default: ''
    },
    inline: Boolean,
    inlineMessage: Boolean,
    statusIcon: Boolean,
    showMessage: {
      type: Boolean,
      default: true
    },
    size: String,
    disabled: Boolean,
    validateOnRuleChange: {
      type: Boolean,
      default: true
    },
    hideRequiredAsterisk: {
      type: Boolean,
      default: false
    }
  },
  watch: {
    rules: function rules() {
      if (this.validateOnRuleChange) {
        this.validate(function () {});
      }
    }
  },
  data: function data() {
    return {
      fields: []
    };
  },
  created: function created() {
    var _this = this;

    this.$on('el.form.addField', function (field) {
      if (field) {
        _this.fields.push(field);
      }
    });
    /* istanbul ignore next */
    this.$on('el.form.removeField', function (field) {
      if (field.prop) {
        _this.fields.splice(_this.fields.indexOf(field), 1);
      }
    });
  },

  methods: {
    resetFields: function resetFields() {
      if (!this.model) {
        "development" !== 'production' && console.warn('[Element Warn][Form]model is required for resetFields to work.');
        return;
      }
      this.fields.forEach(function (field) {
        field.resetField();
      });
    },
    clearValidate: function clearValidate() {
      var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];

      var fields = props.length ? typeof props === 'string' ? this.fields.filter(function (field) {
        return props === field.prop;
      }) : this.fields.filter(function (field) {
        return props.indexOf(field.prop) > -1;
      }) : this.fields;
      fields.forEach(function (field) {
        field.clearValidate();
      });
    },
    validate: function validate(callback) {
      var _this2 = this;

      if (!this.model) {
        console.warn('[Element Warn][Form]model is required for validate to work!');
        return;
      }

      var promise = void 0;
      // if no callback, return promise
      if (typeof callback !== 'function' && window.Promise) {
        promise = new window.Promise(function (resolve, reject) {
          callback = function callback(valid) {
            valid ? resolve(valid) : reject(valid);
          };
        });
      }

      var valid = true;
      var count = 0;
      // 如果需要验证的fields为空，调用验证时立刻返回callback
      if (this.fields.length === 0 && callback) {
        callback(true);
      }
      var invalidFields = {};
      this.fields.forEach(function (field) {
        field.validate('', function (message, field) {
          if (message) {
            valid = false;
          }
          invalidFields = Object(__WEBPACK_IMPORTED_MODULE_0_element_ui_src_utils_merge__["a" /* default */])({}, invalidFields, field);
          if (typeof callback === 'function' && ++count === _this2.fields.length) {
            callback(valid, invalidFields);
          }
        });
      });

      if (promise) {
        return promise;
      }
    },
    validateField: function validateField(prop, cb) {
      var field = this.fields.filter(function (field) {
        return field.prop === prop;
      })[0];
      if (!field) {
        throw new Error('must call validateField with valid prop string!');
      }

      field.validate('', cb);
    }
  }
});

/***/ }),

/***/ 220:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(target) {
  for (let i = 1, j = arguments.length; i < j; i++) {
    let source = arguments[i] || {};
    for (let prop in source) {
      if (source.hasOwnProperty(prop)) {
        let value = source[prop];
        if (value !== undefined) {
          target[prop] = value;
        }
      }
    }
  }

  return target;
});;


/***/ }),

/***/ 221:
/***/ (function(module, exports, __webpack_require__) {

var render = function() {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "form",
    {
      staticClass: "el-form",
      class: [
        _vm.labelPosition ? "el-form--label-" + _vm.labelPosition : "",
        { "el-form--inline": _vm.inline }
      ]
    },
    [_vm._t("default")],
    2
  )
}
var staticRenderFns = []
render._withStripped = true
module.exports = { render: render, staticRenderFns: staticRenderFns }
if (false) {
  module.hot.accept()
  if (module.hot.data) {
    require("vue-hot-reload-api")      .rerender("data-v-54be03ab", module.exports)
  }
}

/***/ }),

/***/ 222:
/***/ (function(module, exports, __webpack_require__) {

var render = function() {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c("div", { staticClass: "login", attrs: { id: "login" } }, [
    _c("div", { staticClass: "login-form" }, [
      _vm._m(0),
      _vm._v(" "),
      _c(
        "div",
        { staticClass: "login-form-content" },
        [
          _c("h2", [_vm._v("管理员登录")]),
          _vm._v(" "),
          _c(
            "el-form",
            {
              ref: "ruleForm",
              attrs: { model: _vm.ruleForm, rules: _vm.rules }
            },
            [
              _c(
                "el-form-item",
                { attrs: { prop: "act" } },
                [
                  _c(
                    "el-input",
                    {
                      attrs: { placeholder: "请输入账号" },
                      model: {
                        value: _vm.ruleForm.act,
                        callback: function($$v) {
                          _vm.$set(_vm.ruleForm, "act", $$v)
                        },
                        expression: "ruleForm.act"
                      }
                    },
                    [
                      _c("template", { slot: "prepend" }, [
                        _c("i", { staticClass: "iconfont icon-yonghu1" })
                      ])
                    ],
                    2
                  )
                ],
                1
              ),
              _vm._v(" "),
              _c(
                "el-form-item",
                { attrs: { prop: "pass" } },
                [
                  _c(
                    "el-input",
                    {
                      attrs: { placeholder: "请输入密码", type: "password" },
                      model: {
                        value: _vm.ruleForm.pass,
                        callback: function($$v) {
                          _vm.$set(_vm.ruleForm, "pass", $$v)
                        },
                        expression: "ruleForm.pass"
                      }
                    },
                    [
                      _c("template", { slot: "prepend" }, [
                        _c("i", { staticClass: "iconfont icon-password1" })
                      ])
                    ],
                    2
                  )
                ],
                1
              ),
              _vm._v(" "),
              _c(
                "el-form-item",
                { attrs: { prop: "code" } },
                [
                  _c("el-input", {
                    staticClass: "login-form-yzm",
                    attrs: { placeholder: "请输入验证码" },
                    model: {
                      value: _vm.ruleForm.code,
                      callback: function($$v) {
                        _vm.$set(_vm.ruleForm, "code", $$v)
                      },
                      expression: "ruleForm.code"
                    }
                  }),
                  _vm._v(" "),
                  _c("img", {
                    staticClass: "yzm_code",
                    attrs: { src: _vm.yzm_code, alt: "验证码" },
                    on: { click: _vm.change_yzm }
                  })
                ],
                1
              ),
              _vm._v(" "),
              _c(
                "el-form-item",
                [
                  _c(
                    "el-button",
                    {
                      staticClass: "login-btn",
                      attrs: { type: "primary", size: "large" },
                      on: {
                        click: function($event) {
                          _vm.submitForm("ruleForm")
                        }
                      }
                    },
                    [_vm._v("登录\n                    ")]
                  )
                ],
                1
              )
            ],
            1
          )
        ],
        1
      )
    ])
  ])
}
var staticRenderFns = [
  function() {
    var _vm = this
    var _h = _vm.$createElement
    var _c = _vm._self._c || _h
    return _c("div", { staticClass: "login-form-img" }, [_c("p")])
  }
]
render._withStripped = true
module.exports = { render: render, staticRenderFns: staticRenderFns }
if (false) {
  module.hot.accept()
  if (module.hot.data) {
    require("vue-hot-reload-api")      .rerender("data-v-69787b62", module.exports)
  }
}

/***/ })

});